﻿<UserControl x:Class="CodeAbility.MonitorAndCommand.WpfMonitor.UserControls.LEDs"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:converters="clr-namespace:CodeAbility.MonitorAndCommand.WpfMonitor.Converters"
             mc:Ignorable="d" 
             d:DesignHeight="250" d:DesignWidth="250">

    <UserControl.Resources>
    </UserControl.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>

        <TextBlock Text="LEDs" Style="{StaticResource DeviceNameStyle}"></TextBlock>

        <Ellipse Grid.Row="1" Fill="Red" 
                    Opacity="{Binding RedLED, Converter={StaticResource BooleanToOpacity}, FallbackValue=0.25}"
                    Style="{StaticResource EllipseStyle}"/>
        <Ellipse Grid.Row="2" Fill="Green" 
                    Opacity="{Binding GreenLED, Converter={StaticResource BooleanToOpacity}, FallbackValue=0.25}"
                    Style="{StaticResource EllipseStyle}"/>

        <TextBlock Grid.Row="3" Text="{Binding RandomValue}"
                   Style="{StaticResource DataStyle}"></TextBlock>
        
        <Ellipse Grid.Row="4" Fill="Blue" 
                 Width="25" Height="25" Margin="10"
                 Opacity="{Binding BlueLED, Converter={StaticResource BooleanToOpacity}, FallbackValue=0.25}"
                 Style="{StaticResource EllipseStyle}"/>

    </Grid>
</UserControl>
